Fix issue with callback not receiving results

Also fixed issue when passing the `to` argument as a string.