bugfix in set_time