Some quick bug fixes.