removed const_cast that were mainly inserted at commit: 482b4832.