Where are you calling those functions? I've seen this problem go away when I call them in Main, just before Application.Run