This is my code. My particular problem is in the else if where I am checking if a brick has been returned. For some reason when I execute remove(window, object), it doesn't remove the instance of the brick and it just stays there. The points get updated though, as well as the scoreboard and the direction. As I am checking if the object is NULL at the beginning of the code (can't be seen in the screenshot), there should be an existing object that I am giving the remove function. Also the window object is legit, as it does update the scoreboard. What can be causing this behavior?