fixed preview when working with layers