function fixes

applied via patch from gorilla branch

Signed-off-by: D. James Burneff <djburneff@djburneff.org>