Fixed lacking first line issue (added cfg as parameter on some create_p calls)