Fix bug in getUserData method