Small fixes to try and make this work