Fixed rebuilding rendertarget bug