Update foundation.topbar.js

on scroll, fixed class was never removed.
changed comparison from distance

All credits to iamjonatha see issue #2564