Small fixes

Tried to fix the issue when session times out, the amount of data doubles
Small fixes here and there