Bug with click event fixed