res is never defined.

fix #45