This seems to work, finally