altered a if statement setting a boolean value