Improve fix for #51