More changes and fixes to try to get this to work amongst other things