fixed minor bug in click square function (order of methods)