Fixes to get this working