Put removeRules INSIDE the null check. -.-

Sorry. I'll just stop now.