re-added the missing check for preview mode #258