ya, thats your problem. it seems to me that there is a wdl function that will do that for ya, but i can't seem to remember it. You could go hunting through the manual, but it sounds like you have it fixed, so if you want that, go right ahead. (i still thing the other way would be cleaner though.... )
-merlingames