fix order in if print