fix lastcam logic