Fixed assertion violations