fix fn for command line window.