Handle bad API session better