fixed plotting issue