Running some tests, and minor bugfix