Fix shitty function