fixing compatibility bugs