Fixed a hiding array out of bounds error