Fixed #322, #324