fix issue #23 null exception.