Fix bug: resource location; Change code style