fix some problems with render