Fix code completion bug