Removed redundent reslicing
Corrected session.lock format