name resolution bugfixes