Fix bug in jQuery UI v1.8.24