Finilize middleware engine, bug fix for updateLocalFromRemote method