Corrected some type conversions in hooks.go