FIX for flashing
finally got the fix for flashing right