fix safe-buffer