Align 1.9 and 2 APIs, close #636