Removed the IllegalStateExceptions.