fixing deprecated assert