Fixed the close all modules when clicked outside.