fixed assertion a little bit