Fix #585