solved lots of warnings