Fixed missing parenthesis. Resolves issues #92, #161, and #170.

Missing parenthesis were causing flash write if-statement to execute not as intended. Should fix issues #92, #161, and #170.