iPhone 5 Restoring firmware stuck 99.9%

iPhone 5 Restoring firmware stuck 99.9%

Phone is stuck at restoring firmware at 99.9% every time.

Tried restoring from Recovery mode and also from DFU mode.