Fixes some warning and error.