fixing resources variable