Make sure to pass a hashtype if you have it

Fix for #12478