Change condition to use actual boolean value