fixed #2, fixed #4