Fixed another bug with hooks