Fixed download library bug using api