Fixed #420 and fixed #421