Fixed bug in elementdb.js