sml: fix resolution bugs in resolver