remove listener in order to avoid memory leak in preferences