Fix can't get resource in production mode.