fix a bug when pathCamera is the first camera