Some quick fixes to get around weird dict errors