Various smaller fixes