Time computation bug