Added merge option
Fixed merge in GUI mode