Fix #118, #119, #120