fixing issues with order in autoincluding