plugin hook priority #977
#977 change sort to ksort,slightly faster simpler code
add priority to filters , removed loop protection temporarily