final fix for reset bug