fix building on linux + remove resolution parameter

This pull request fixes building on linux.
I removed the resolution parameter in the call to distance, as Template does not seem to have that parameter.