Fixed bad resource comparison.