quick fix for list out of range error