Fixed deplete and add barapi to resources