bug in setting time limit