fixing a couple of date bugs and an issue with non-primary keys being used by accident