make preview work fix some other nits