fixed issues with assert