Fixed some bugs I introduced earlier today.