Minor fixes for the functions file