layout fixes
special case for BSD / BSN
js var declaration