Fix safeAttributes bug in search()