fixed all -Wall errors