Fix issue with braces in mouse listener