Improved the double clicking functionality.