fixed errors with js rendering