more debugging, compatibility fixes