fixed major error that crashed app