fix bug and add success intent
dont change mode when sleeping
add exit sleep intent