fix create flat window demo