fixed snprintf() usage all over the place