fixed double painting bug