Converted the session adding to have better reaction to fails