Fixed half-assed code, thanks for spotting that @JPTigr