Added Java 6 compatibility

Fixed a dedicated server bug