Fixed bug in handling of scalar foreign functions and clarity wibbles