Mkwrapper fixes

fixes a possible value under-run and broken error handling in preview class