fix todo completion bug