fix according to upstream changes