Fixed buffer issue