fix bug in prevent clicks