Fixed creation of resoruce class.