Fixed a couple bugs and undesired effects.