fixing app crashes