Fixed some app bugs