fixed things in formats.js