Fix paint issue on ImageBasedFrame and event loop in StackRenderer.