fixes to allow this to work