Non-const case is working