It turns out it was the UInt32 that fixed my problem...well not exactly. I'm not getting compiler errors on it anymore but when I run it in X it doesn't quit from the programs application menu!!! Any ideas why?