fix wrong window frame
fix capture bug