bug in replacement