fixed issue when deleting pins