ticket:5 fixes according to the comments