Removed optimization that led to flickering artifacts.