Fixed a bug that might come up if you are using Java 7