Keep window open
Fixed #774 [gh#774]