fixing warnings in plot