Fixed a couple small flaws