Fixed Java 7 compatibility (thanks Yukie666 for the report)