fixed issues in createCustomFormat()