various fixes found so far