Fix #10, fix #11, fix #13 & fix #14