Got rid of strange exception that seemed to be thrown for no reason.