Fixes issue with plotting