Fixed resources if statement