Fixed plotting error