Fixed problems with the app.

It now works correctly.