fixed two regressions introduced in d193064e9 in core.py
fixed two regressions introduced in d193064e9 in core.py

oldmantaiter/disco,discoproject/disco,ErikDubbelboer/disco,pavlobaron/disco_playground,ktkt2009/disco,scrapinghub/disco,pooya/disco,discoproject/disco,mwilliams3/disco,pombredanne/disco,pooya/disco,oldmantaiter/disco,oldmantaiter/disco,beni55/disco,seabirdzh/disco,pombredanne/disco,oldmantaiter/disco,mozilla/disco,ErikDubbelboer/disco,simudream/disco,simudream/disco,scrapinghub/disco,pooya/disco,scrapinghub/disco,seabirdzh/disco,beni55/disco,mozilla/disco,mwilliams3/disco,ktkt2009/disco,simudream/disco,ktkt2009/disco,ErikDubbelboer/disco,ErikDubbelboer/disco,ktkt2009/disco,simudream/disco,mozilla/disco,mwilliams3/disco,seabirdzh/disco,mozilla/disco,pombredanne/disco,seabirdzh/disco,mwilliams3/disco,pombredanne/disco,pooya/disco,scrapinghub/disco,ErikDubbelboer/disco,beni55/disco,discoproject/disco,mwilliams3/disco,ktkt2009/disco,discoproject/disco,beni55/disco,pavlobaron/disco_playground,beni55/disco,seabirdzh/disco,pavlobaron/disco_playground,pombredanne/disco,discoproject/disco,oldmantaiter/disco,pavlobaron/disco_playground,simudream/disco