fix undefined `res` error
Merge pull request #2 from cvan/master

fix undefined `res` error