Minor improvements, fixed #19