Fixed some issues with name resolution