fixed problem with array assignment