you might want to check out this snippet http://hawkee.com/snippet.php?snippet_id=613 for a better solution to handle such problems.