Fix #505