Additional bugfixes and changes