Fixed plotting problem