fixed terminating of app in intellij