more fixes for decl order