fixed compatibility errors