solving clicking problem