add missing continue, make buffer power of 2