added nullcheck
further fix?