Fix travis failing tests

@samsonasik Single PR for #6603 and #6605