Array continues to go out of scope