fix boolean class cast