Fixed hooks on Ubuntu.