fixed some bugs

Typo not using the API, and a missing read