Add/edit pastes functionality bugfix