Fixed bug with click on outer div