fix bug with default function argument