some fixes to media_library related stuff