Accounted for no position() when not vertical
Simplified top/left code fix