fix potential bug in ==
modify remove_shape and add new test