bugfix for mongodb compatibility