Fixed destroy call

Calling the destroy method gives an error, since `res` is undefined.