various fixes and features