Fix #175, #220, #223