Modification suggested by Asgeir.