fixed preview encoding