Fixed a few issues in previous commit.