Fixing some misc code.