fixes intermediate instructions layout