Fix plot bug