Fix #120, #104, #119