Bugfix, check for null