Array bug fix
Revert "Array bug fix"

This reverts commit 55a27c19aa92fc5fb3978e3d7d75fe57cdbf59c0.
Bug fixes