Attempting to fix some bugs.