Fixed some stupid type errors

int() expect string, not SimpleLazyObject or something.