Fixed some UNDEFINED_INDEX notices.