make buffer power of 2