Do you have some code we could look at? It's difficult to diagnose the problem without it.