fixed #16
Fix #7, #16