Fixed bug in variable storage and added variable query conditions to
execution query.