Minor fixes in assembly and repolayout