Updated version, now works with BEF.

(cheers gurmil)