minor fixes provided by foxxagen