Fix for 'removeInstance is not a function'