bugfixes in case of null values