fix #1318

Issue caused by f0e762285678e4c8ab7588b13ea4e616ce605d1f