Fix bugs with top most pixel (border and flyout)

This should fix the bugs related to the top most pixel.

---
MOD Edit
Fixes #921 ?

[From Amrykid, cc @flagbug: will this fix it?]