Workaround for odd event behaviour affecting certain applications.