fixed code issues with exceptions