fix from ryandotsmith:master