Added curly braces to meet coding style, corrected height variable instead of width on L242