An improvement to previous #33 fix