Minor changes to handle_tick and handle_timer