temporary fix for mixed constness, very hacky should not remain in long term