and fixed some warnings...