Fix all the bugs crendgrim just reported so that he can get his stuff running.