fixed assertion issues