#1175 part 2

@matheod pointed out some failings