Revert "Revert "Fixed bugs that happened because of typos...""

This reverts commit 01ea205e1ee25a24809604acdf1c8d94a28b4765.