Fixing issue where boolean was casted to 1 or 0

Fixing an issue where the boolean was not converted to a true boolean for output in the javascript.