fix failed assertion / crash