Retrieves problem code correctly