Further precaution to index error