added compiler warning and fixed some minor stuff