Update template fix

Fixed bug that made updating an already created template hang, this now
updates properly and returns back to templates page on success.