attempted fix to bad legend rendering