Bugfixes for empty/undefined values