Changed error message
added test for invalid index deletion