Fixed Format string warnings

Fixed all the wrong format string warnings
depends on #783