Added exception to be thrown in certain cases