Fixing exceptions issue