Fixed crash on api start