Apply makeForm when tab activated
Fix sql parsing bug