Fix errors thanks to @RobinVivant