syntax error causing app to crash - fixed