fix processingjs handling of preview