Fixes many warnings