fixed a small bug when passing an array to the constructor