fix bug in rendering 3d cylinder