Various fixes I can't even remember