Moved exit 0 to where it was. Works now.