Fixed equals code