Resource changes and bug fix