Everything getting added to array twice