Fix for Java 6 button press