fixed null termination issues with strings stored in parameters