improve assembly resolution logic