Some quick patches. Testing now.