Some various fixes