fix resizing preview