loading bar should close on failure