Fixing a few bugs, updating the version to 2.3.1