small changes in the modal menues js code + improved cache invalidation for threads