Correct spinner behavior in case of js errors/exceptions