fixed a bug in the app class