fix for branch 5.7
fix special treatment of 5.4