Resolving str/int type errors