some warnings and compmilation error fixed