fix of error in mapBuffer