My mistake. I noticed ```kwargs``` was not used anywhere else so moved this to here and forgot to remove line 1279.