final app clean up
fixed a bug