Trying to fix MongoDB serialization error