fixed preview bug with websockets