Fixes issue #742

Fixes #742  http://jsfiddle.net/GvYP8/1/