Fixed first_app redirect loop