Fixed a few mistakes found during pre-PR