Workaround for jQuery 1.7 bug