fixed rndering twice issue