fixes ClassCastException for notify block breaks