Bayonet mechanism