Fix #11, #26, #32.