Bug fix for addFirst() plus warnings