Fixed array assignment error