Tried some typecasting, hasn't quite fixed the issue