Some changes which may or may not fix what happened in #37.