fixed a bug that caused prog to crash more often than it should (Regarding nils in list).