Fixed buffer discard, limited travis to Java7