Fixes
add transaction to sort in order to improve perfermance