Bugfix for sleepdata