Fixed a bug with the wake time