Fix for issue 9389 on jqueryui trac

This is my try fixing my submitted bug here: http://bugs.jqueryui.com/ticket/9389