Fix #6 issues