fix issue with closing an Frames not working

this only happens with newer jQuery, but this should be cleaned up, anyway.