Fix #1255671 and enhancement #1255676