solving a bug with the rendering mechanics