fixed some scanning/DB fileId issues