Fix a bug to allow resources with _ and -