Fixed silly bug in resources error handling code. (it compiles now)