Trying to fix a couple bugs