Fixed bug when passing invalid call index