various fixes and rule changes