fixed #12, fixed #9