Fixed query
Fixed session bug