Added detection of clicks