fix reading of old database formats, with checking this time