Rewrote the get_options calls to improve compatibility on windows