fix #4479, method ordering bug