Re added stuff for generating patch