added no resource error handling