Fix #3
Fix #10
Fix #9