ticket:13 some fixes