cosmetic and bug fixes