Fixed some problems found during use.