Fixed buffer issue, debugging substitute stuff