Fixed #649 and Fixed #655