Issue145

Fix for #145. Tested on ubuntu-trusty-14.04-amd64-server-20140926 (ami-0070c468).