Identify and correct code issues in the following snippet of Python code.
def foo(x):
    if x > 0
        return x
    else:
        return 0
def foo(x):
    if x > 0:
        return x
    else:
        return 0