Fix sample and userprofile retrieval