various changes, fixes