Moved timer_free to the right place