Created sessions and fixed errors