fixing exceptions stuff