Added invert option to make_sp_irc and fixed works