Bug fix on the renderer and minor other tweaks