merge fix to sleep bug in platform