Fix bug #353 #349