Borked logic, it should be an if statement not an unless