fixed #1, #4