Fix breakage of Live preview (patch by dantman himself)