Fixed #131
Reapplied 55b6425d1a8f1da501135fe8cf00dc5b7a748033 that I removed.