quick fixes so that this compiles for SDK 0.4.4, 5 seconds test indicates that it seems to work, but need to review to make sure everything is actually correct