fixed a bug that prevented 0 to be a a valid list index