Fixed rule positioning and some cases for poorly formatted rules that are still valid