fixed bad behavior of app