Bug fix and handle dist fallback