fix bug in user constructor