bug fixes in pysmallk preprocessor code