Fix #11, #12, #13