Fix warnings
Quick hack. Should do better fix