Correct a typing issue + small changes