"return 1" should be "return 0".