RuntimeWarning error fixed