whip: Fix undefined bug