final fix of bug