Fixes couple of errors and warnings