fix some errors up to ion issues