cleaned up a couple bugs