Convert bool back to int for db storage.