Fixed bug causing crash on old WordPress versions