Fix rendering z-buffer related error.