Fix setting of NULL to readonly variable in Dispose()