Fix bug that would raise an error when going from Manual mode to Auto on

A small update to fix a bug while running under windows.