Fixed use of promise with BaseLibrary