Fixed menus not going back to sender

Also improved the logic and removed redundant code.