Added proper equality checking.