Fix PHP error so plugin works correctly

Please fix and push this to wordpress.org