Several simple fixes