minor fix for error checking on custom functions and colon added to definition