Fix #38, #40