Fix several undeclared functions