Fixed bug in resolving code.