fix bug in reading data for kernel patch, some change for debug video patch