fixing boolean handling