Format detection bugfix.