Fixed a bug in app