solve UnboundError Exception