Fix what looked like potential bugs in observation script