Prepared for v1.3
Fix sql bug