Fixed issues

Fixed compatibility issues with older versions of java