Fixed some issues with multi-depth arrays