Improved fix to use triple equal comparators instead of double.