Removed the check for shell mode as it isn't really needed