Fix #511