fixed ggplot compatibility (I think)