Removed extraneous endif...though your compiler might say your missing one...