fix forward reference error