fix array construction