Minor fixes in functions.h