strncpy is tricky to use, since it doesn't guarantee the string to be NULL-terminated; add strCopy that uses memcpy to fix that
Fix string copying problem