Improved a couple minor bugs