Fixed buffer error