minor improvements, fix #7