bugfix (render.c), minor tweaks (the rest)