some fixes and mods