adds better handling for global commands