Fixed some sloppy code