Fixed warnings and size of initial buffer allocation