fix default for undefined values