Fixed condition that prevented dropdown from closing when clicking outsi...

...de of its scope