misc bugfixes (__id__) etc