Fixed a bug with pair creator