added support for window name replacement