quick fix to registercontrol line 68 if statement