Fix small regex issues and handling wrong number formats