*fix a bug of index
*only checkonephasesolution if the given solution is not none