Add assertions based on @elmart's feedback.