Various kinds of fixes