Fixed click outside bug