fixed unmapping buffer