Fix compiler warnings about const qualifier