Fix: Api calls wills till function even if no database loads.