Added patch by thegreyman (see http://www.factorioforums.com/forum/viewtopic.php?f=14&t=4287&start=40#p43659)