Stuck in recovery mode re-boot HTC One M8

A

AC Question

I performed an exchange server active sync to try and get work email on my phone. Part way through it ran out of battery and when i turned back on it said i would have to perform a factory reset and will lose all phone data. It now takes me straight to the android system recovery black screen where i have tried to factory re set but this isnt doing anything. I can get in to the bootloader and try to factory reset from there but my phone just reboots and takes me back to the system recovery screen. How do i get it to factory reset?