fixed #2, fixed #8