Fixed bugs

- Items were not popped from the id stack
- activate c++11