Yeah same, that happens to me too. It sucks when the lums/cages you're missing in the level happen to be in the second phase or later. Sometimes I habitually just reset the game and start over from the same level fresh.
Also, yeah I've had trouble aiming for the last switch myself, though I usually don't turn when jumping from the ramp whenever I shoot. Even if i did get it the first time, I also have trouble collecting all the lums at the end and usually end up missing one. Either way, I always die in every phase in the Prison Ship at least once or more to try collecting everything in one go.