fixed #1, #2