added switch to disable inline preview