Develop: added null checks and bugfix 5175