Fix for http://jsfiddle.net/a54L9/