Fix #557, Fix #554