These 4 lines of code are where the problem happens.