Is your game new in terms of code?
If you have only a few lines of code,and you understand that its impossible for that to be happening it might be a bug.
Unless someone else knows what happening.
I suggest creating a project and see if this bug your having goes away,that's if you only have a few lines of code.