Fixed a few functions.