fixed resources bug