added check for unsupported idb, ugly code