fixed #5, fixed #6