warning and error fixes