ticket:5 fixes according to comments