fix mistake in defining types of str functions