Only sync window frames when the frame exists.

Fixes #50.