Fixed some errors in commit 5b25859a