bug_1039, more readable fix