Release lock inside thread
Don't migrate empty library items