Follow code via F8 key and check variables value to understand the issue …