fix boolean conversion