Flipping Spritemaps in Buffer mode

Fixing errors discussed in issue #326