Fixed major bug in previous commit.