fix usage of getdefault(0