Fixed app crashes