Fixed the signatures of append and prepend