Added test Render

and some bug fixes