various changes & fixes