Fix #322 & Test