Fix name resolution in methods