Fix syntax issues, and stress case issues