fix leading to unbound error