disable preview function