fixed some hook to work with 2_4