Problems with random: begin and random: end