Resolved issues in neonclient.js

Fixed bugs I had fixed earlier but Denney reverted.