Change equality check to fix #151.