fixed const problems (Bjorn said)