should now work with versions older than 8.4

previous commit fixed to work with current stable versions but now breaks older versions.

This patch should make it work with both.