FF compat fix and some minor bugfixing