Fixed stuff from b00b9cd26e445dcef52d29b3a3db3253dd4c3137