Improvements and fix for #1.