wrong condition in checking if csy's are equal