Added cast and removed formatting error