ticket:3 fixing according to comments