fix user related function