Bugfix last commit, check for undefined