adding over-flash protection