fix compilation error for flash