fixed #706 : modified if blocks curly-bracket