corrected typed array construction