Fixed corruption due to invalid array access