Updated.
Should work in most cases.