Fix a couple bugs for a working dev version