I made PR gh-262 that do this. When merged, can you rebase on top of it and remove the cast to double to test it?

thanks