Remove lastValue and handle with default dispatch function for empty and append