Fix for double click error

Fix for double click error and other minor tweaks