Fix bugs introduced by new rust nightly