swap buffer bug