Fix bugs in array klass construction.