Logical error, wanted to fix an error within a if clause that didnt run because it did not trigger