fixed weird sleeping issue