Fix for http://jsfiddle.net/xAMQa/1/