Bye bye undefined indexes! Resolved!