Fix resources bug