removed unnecessary copy operation on newly created string
using a static cast to id instead to calm the compiler
thanks to @yas375 for finding this