fixes boolean flag false/true issue