Fix FlashTarget crash
Merge pull request #4126 from ScottNZ/flashtarget-crash

Fix FlashTarget crash