added more exceptions and more tests, still kind find bug that causes #12