I just solved this problem, by executing the official RUU from htc that I downlaoded. I cant post links since I am a new user, but you can look for your own RUU by searching with Google "RUU HTC One M8". Look for your own, download it, execute it, follow the instructions and enjoy your phone...