Added condition to stop choosing random integer between 0 and 0
added where i think -index out of range- is being caused. Cant fix because i dont know what the section does.