fixes a bug in yywrap()