Fix last version query with deleted module