fixes debug output + arg bug