fixed bug in clicking too soon