Fixing syntax to include the required end