py3.2 compatibility
prevent flicker on borders