fix available_funds