fix legacy fallback code