Tidy up some strays and prevent errors in dev mode