You are right. Refer to https://gist.github.com/jsw0528/4720584