It is apparently possible to build a sniper with the (s) key at the same time you can cancel the structure with (s) as well. This causes you to lose all the resources that went into both the building and the sniper if timed perfectly.
Don't use hotkeys....Bug fixed.