fixed warnings on linux and removed consts