Adjusted eventhandler for sorted list