- Fix argument checking - Close correct handle - Patch by Kuts Alexey - bug 6004 svn path=/trunk/; revision=51087