clean up errorAlert directive