fix compatibility errors