Return 0 instead of 1, added braces