Gpii 947

http://issues.gpii.net/browse/GPII-947
make sure to use the braces `{}` around all conditional blocks. It will prevent errors.