Refactored append() to address travis build error.