Fixed error with resources reference in prototype function.