Fix various mistakes