Fix #32, #43, #47