Hello,
For some reasons, I do not see that code you posted? Could you please repost so we can try to reproduce and provide further ideas? Is it a client-side or a server-side event?