ticket:3 Fixes according to ticket 2 bugs