Tweaks and mysql-formula fixes