some alignment fixes for streams