fixing wakeup_time behavior. threads are still broken, though