convert bool to int for publish