fixed detect_shell and detect_shell_version