Fixed bug in session var set on uploading a file