Updated to fix a few issues found while integrating with HopJS