more fixes

order of ofp actions matters. don't output before doing all the actions