This just looks like a mistake in your events. Note object sizes are allowed to be negative if the object has been mirrored/flipped, and the viewport edges are allowed to be negative if they are outside the layout bounds. If you think either the viewport or object size expressions are returning the wrong value, it should be very easy to prove: just make an empty project displaying the values and describe what the value is vs. what you expect. If you can't do that, it's probably because everything in Construct 2 is working just fine and you made a mistake yourself.