make it sh friendly. fix GH #407