Fix black screen in non-buffered rendering mode