Adding to hashArray was in wrong place