wrong logic on if statement should be !=