Changed unnecessary session opening