fix slim safe-buffer

rif #1039