Fix bug identified in oddshocks/fedimg#1