finally fix hook class loading, fix permissions hook