Made hook more secure.