fixed equality checking for Shapes