fix mistake in out allocation