PR: 32423 Submitted by: chris@aims.com.au
PR: 31871 Submitted by: Sergey Skvortsov <skv@protey.ru>
(Classic version). PR: 24313 Submitted by: Geoffrey C. Speicher <geoff@sea-incorporated.com>