Endleaves bugs and pointers