Use ceil function instead of randround