array key checking in a couple of more places