Fix a few bugs introduced in the previous dev iteration