fixed initial rendering issue