Fix validity previous_query
Merge pull request #43 from kandarz/master

Fix validity previous_query