Fixed code to have the new resource type form working