Fix #96, #97, #98