You're checking _currentCustomViewer in this call to actually remove it if it exists. So why are we nulling _currentCustomViewer before this call? Also, I think nulling _currentCustomViewer should be done inside `_removeCustomViewer()` since that's the time we no longer have the custom viewer.