Looks like you're missing a 'fi' for the conditional above