Fixes in Attachments, User History and File Remove Permission Check