bug fixes to accept madlib_schema as input