add bug471 code