bug with two arrays fixed