Fix #581, Fix #580