fixing exceptions