Fix clear image bug