Fixed string size calculation thanks to @rahulgautam snippet