Added necessary 'endif' to my 4.6 override function

Should work now ^_^