Correct error where if{} was closed at wrong point
Fixed potentially major error!